﻿#pragma once

#include "../MonsterObject.h"
#include "../ConquestObject.h"
#include "../../MirDatabase/MonsterInfo.h"
#include "../../../Shared/Enums.h"
#include "../PlayerObject.h"
#include <cmath>
#include "../../../bankersrounding.h"

using namespace Server::MirDatabase;
using namespace Server::MirEnvir;
namespace S = ServerPackets;

namespace Server::MirObjects::Monsters
{
    class Wall : public MonsterObject
    {
    public:
        ConquestObject *Conquest;
        int WallIndex = 0;

        virtual ~Wall()
        {
            delete Conquest;
        }

    protected:
        Wall(MonsterInfo *info);
    public:
        void Despawn() override;
    protected:
        bool getCanAttack() const override;
        bool getCanMove() const override;

    public:
        void Turn(MirDirection dir) override;

        bool Walk(MirDirection dir) override;

        int Attacked(PlayerObject *attacker, int damage, DefenceType type = DefenceType::ACAgility, bool damageWeapon = true) override;

        int Attacked(MonsterObject *attacker, int damage, DefenceType type = DefenceType::ACAgility) override;

        void RepairWall();

        void CheckDirection();

        void Die() override;

    protected:
        int GetDamageLevel();

        bool getCanRegen() const override;
    };
}

